import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/views/Login.vue'
import Main from '@/views/Main.vue'
import Home from '@/views/Home.vue'
import Community from '@/views/Community.vue'
import StoreManage from '@/views/StoreManage.vue'
import OrderManage from '@/views/OrderManage.vue'
import SalesService from '@/views/SalesService.vue'
import StationManage from '@/views/StationManage.vue'
import GoodsManage from "@/views/GoodsManage.vue";
Vue.use(VueRouter)

const routes = [
  {path:'/',redirect:'/login'},
  {path:'/login',component:Login},
  {path:'/main',component: Main,redirect: '/home',
    children:[
      {path:'/home',component:Home},
      {path:'/community',component: Community},
      {path:'/storeManage',component: StoreManage},
      {path: '/orderManage',component: OrderManage},
      {path: '/salesService',component: SalesService},
      {path: '/stationManage',component: StationManage},
      {path: '/goodManage',component: GoodsManage}
    ]
  }
  /*{
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    component: () => import( '../views/AboutView.vue')
  }*/
]

const router = new VueRouter({
  routes
})

export default router
